package net.zjitc.stack;

public class Demo {
    public static void main(String[] args) {
        int sum=f(10);
        System.out.println(sum);
    }

    private static int f(int i) {
        if (i==1)
            return 1;
        return i+f(i-1);
    }
}
